<div id="tables" >
<h3> Tables </h3>
<h4> Number of Tables: <%= @table_stats.stats_list.length %> </h4>

<table class="ht-table table_nodes">
<colgroup span="4"></colgroup>
<thead class="ht-table-thead">
<tr class="ht-table-subheader">
<th  class="ht-table-subheadercell">Summary of Tables</th>
  <% @table_stats.timestamps.each_with_index do |ts , i| %>
           <th class="ht-table-subheadercell">

                   <%= @table_stats.get_time_intervals[i].to_s + " minute" + (@table_stats.get_time_intervals[i].to_i > 1 ?  "s"  : "")%> <br/>
                  <%= (Time.at ts / 10 ** 9).strftime("%Y-%m-%d %H:%M") %>
           </th>
       <% end %>
 </tr>
</thead>
<tbody>
<% sort_data_hash(@table_stats.stats_total).each do |key, values| %>
<tr class="ht-table-firstrow">
  <td class="ht-table-cell">
      <%= @table_stats.get_pretty_title(key) %>
  </td>
<% values.each do |k,v| %>
<td class="ht-table-cell">
<%= number_with_delimiter v %>
<%= @table_stats.get_units(key)%>
</td>
<% end %>
</tr>
<% end %>
</tbody>
</table>

</div>
<br/><br/>
<div id="rangeservers">
<h3> Range Servers </h3>
<h4> Number of Range Servers: <%= @range_servers.stats_list.length %></h4>

<table class="ht-table table_nodes">
<colgroup span="4"></colgroup>
<thead class="ht-table-thead">
<tr class="ht-table-subheader">
<th  class="ht-table-subheadercell">Summary of RangeServers</th>
 <% @range_servers.timestamps.each_with_index do |ts, i| %>
<th class="ht-table-subheadercell">
       <%= @range_servers.time_intervals[i].to_s + " minute" + (@range_servers.time_intervals[i].to_i > 1 ? "s" : "")%>
       <br />
       <%= (Time.at ts / 10 ** 9).strftime("%Y-%m-%d %H:%M") %>
  </th>
  <% end %>
</tr>
</thead>
<% sort_data_hash(@range_servers.stats_total).each do |key, value| %>
<tr class="ht-table-firstrow">
  <td class="ht-table-cell">
      <%= @range_servers.get_pretty_title(key) %>
  </td>
<% value.each do |k,v| %>
<td class="ht-table-cell">
<%= number_with_delimiter v %>
<%= @range_servers.get_units(key)%>
</td>
<% end %>
</tr>
<% end %>
</table>

</div>